Video camera lens systems continue to evolve, such that they have higher and higher zoom factors. When using the higher zoom factors it is desirable to control the pan and tilt speeds of video dome systems at an inversely-proportional rate, i.e., slower speeds in order to follow distant objects. Methods to control motor speed with a combination of proportional, integral and derivative terms (“PID”) for video surveillance systems are known.
Now referring to FIG. 1, a block diagram illustrating a typical PID-controlled system of the prior art, generally designated as “10”, is shown. In this type of control system, the Proportional, Integral and Derivative error terms are summed to derive an output value to control a voltage level or Pulse Width Modulated (“PWM”) signal which drives a DC motor 12 coupled to a gear assembly 14, which then drives a pan platform 16. The speed error value used in such a PID control system is typically calculated by subtracting the measured speed from the commanded or desired speed. The proportional term is calculated by multiplying the speed-error times a proportional constant. The derivative term is calculated by multiplying the change-in-speed-error times a derivative constant. Change-in-speed-error is the current speed error minus the previous speed error. If the speed error has not changed, the derivative term will be zero.
When the error goes from zero to a positive value, the proportional and derivative terms can add to nearly twice that of the proportional term alone. This gives the circuit a faster response when the error is increasing. Similarly, if the error is cut to half the previous value, the derivative term will be negative while the proportional is still positive and the two can nearly cancel each other out. In this condition, the derivative term is reducing the effect of the proportional term when the speed is approaching the commanded speed and the error is decreasing.
The integral term may be calculated by multiplying the speed-error times an integral constant and adding that to an accumulator. The integral constant is usually much lower than the proportional or derivative constants, such that the integral accumulation slowly ramps up or down to remove any steady state error that the proportional or derivative terms cannot compensate for. The steady state speed will be controlled entirely by the integral term, because when the speed is equal to the commanded speed, the error is zero and both the proportional and derivative terms will become zero. The integral term will be just large enough to compensate for steady state load. The speed error calculator subtracts the measured speed from the commanded speed and feeds the speed error to the PID controller.
It is also common practice to use an encoder/sensor 18 to detect or measure incremental change in rotational position. An encoder, also called a rotary or shaft encoder, is an electro-mechanical device used to convert the angular position and thus movement of a shaft or axle to an analog or digital code, as known in the art and described in more detail below. In these systems, the number of quadrature cycles per given time period is proportional to the speed. The pulse stream from the encoder 18 is converted to a speed measurement to monitor or otherwise update the actual movement of the device, which may be at a rate of every 10 ms or so. As shown in FIG. 1, the encoder/sensor 18 detects or measures incremental change in rotational position of the motor 12 and/or gear box 14. The sensor or encoder 18 typically includes two pulse stream outputs: commonly labeled Ch. A and Ch. B. The two pulse streams are designed to be +90° or −90° out of phase with respect to each other depending on whether the encoders are rotating in one direction or the other. FIG. 2 illustrates a waveform having a 90° phase difference between the two channels. These illustrated signals are decoded (i.e., into a binary output of 1 or 0, for example) to produce a count up pulse or a count down pulse for a particular period or cycle time.
In order to achieve more accurate speed measurements from the encoder 18, it is also common practice to count all of the edges 20 from both channels over a given time period “t”. In such systems, the number of quadrature cycles or edges per given time period is proportional to the speed (i.e., the encoder has a fixed, known number of cycles or increments per turn of the motor). Again referring to FIG. 1, the pulse stream output of the encoder 18 is converted to speed by a speed decoder 22, which may take into account the number of increments or edges per revolution of the motor 12 to produce a measured speed output. The speed decoder 22 then outputs the calculated speed value to a speed error calculator 24, which compares the speed measurement decoded from the encoder 18 and compares it to a speed input command 26. The speed error is then processed by a PID controller 28, which subsequently updates a PWM driver 30 at a typical period rate of every 10 ms or so to control or otherwise manipulate the performance of the motor 12.
To achieve an increasingly accurate control of speed and position, the encoder 18 is commonly coupled to a motor shaft of the motor 12 with the gear assembly 14 positioned between the motor shaft and the movable platform 16, as shown. The gear box 14 increases the number of pulses output from the encoder 18, directly proportional to the gear ratio and also allows a smaller torque motor to turn the platform. However, increasing the gear ratio reduces the maximum speed that can be achieved with the same RPM motor.
In a video dome system, another desirable mode of operation is to jump to a pre-determined position as fast as possible when a door alarm or motion detector goes off etc. If, for instance, a video surveillance system was required to go to any target from any position in less then a second, the gear box must have a limited gear ratio to allow the motor to ramp up to maximum speed, turn the platform 180°, and ramp back down to a stop at the target, all within 1 second. Installing a larger, higher speed, higher torque motor could improve high speed control while allowing a larger gear ratio, but the drive system would be larger and more costly.
It is difficult to achieve smooth control of a video camera platform below 1.0° per second when using a limited gearbox ratio, a limited motor size to reduce physical area and cost, and an encoder with a practical number of pulses per revolution. At very low speeds, there are so few pulses per second that the speed reading acquired in a 10 ms period is not very accurate. A second problem at very low speed occurs if there is a rough spot in the bearing or gear system, where the platform can go from 1°/sec to a stalled condition in less than 1 ms. Increasing the inertia of the platform with increased weight, similar to high end 33.3 RPM record players, will help smooth the low speed movement, but would require too much additional torque when accelerating to a distant target.
Common video surveillance motor control systems perform the PID calculations every 10 ms. The output value either controls the voltage fed to the motor or controls the pulse width of a fixed voltage, driving the motor. PWM systems are generally simpler and more efficient. The frequency of PWM systems used in video domes is commonly set at a fixed frequency where any noise generated does not interfere with the video signal, high enough to be at least several magnitudes above the time constant for the motor drive system and above the human audible level (>20 KHz). A PID calculation period of 10 ms and a 20 KHz PWM frequency results in 200 of the same width pulses to the motor between each calculation, which can result in significant discrepancies between the desired or commanded speed and the actual movement of the video system due to the latency in updating the calculation. Although the prior art is explained with reference to pan motor control, it is understood that prior art operation for tilt motor control is similar and is therefore not explained herein.
In view of the above, it is desirable to provide a low cost, effective video surveillance system having improved capabilities for low speed movement and control thereof.